<?php
/**
 * Created by PhpStorm.
 * User: teddy
 * Date: 6/30/16
 * Time: 3:54 PM
 */


/*数据库链接*/
$mysqli = new mysqli('192.168.2.191','root','pwd','Mobile');
/*Sql语句*/
$sql = "update Mobile.Doing set status=1";
/*设置UTF8*/
$mysqli->query("set character set 'utf8'");
$mysqli->query("set names 'utf8'");

$results = $mysqli->query($sql);

// begin to run
exec("sh Run.sh", $val, $val2);
sleep(1);



echo $val2;

$sql = "update Mobile.Doing set status=0";
/*设置UTF8*/
$mysqli->query("set character set 'utf8'");
$mysqli->query("set names 'utf8'");

$results = $mysqli->query($sql);